|
This page last changed on Dec 17, 2010 by kgomes.
In order to properly have a test environment for our Alfresco installation, I went ahead and setup a HP xw4100 with Windows Server 2003 (SP-2) and setup an instance of Alfresco on that machine. Here are the steps I completed.
- Logged into alfresco-test.shore.mbari.org as a local admin (my user account).
- Downloaded Java 6 SE Development Kit Update 5 from java.sun.com and then double-clicked on the .exe.
 |
I installed it to c:\bin\Java |
- I added a Environment variable to the server named 'JAVA_HOME' and pointed it to 'C:\bin\Java\jdk1.6.0_05'
- I then added ';%JAVA_HOME%\bin' to the end of the existing PATH environment variable
- I then went to http://customers.alfresco.com
- I logged in using kgomes@mbari.org as the username and the password that was supplied in an email to me from Alfresco
- I browsed to 'Company Home'>'Downloads'>'2.1 Releases'>'2.1.1'
- I changed to the 'Details View', made 40 items visible, and then downloaded 'alfresco-enterprise-tomcat-2.1.1.zip' file.
- I then unzipped the downloaded file to c:\bin which created an alfresco-enterprise-tomcat-2.1.1 folder in c:\bin.
- I renamed the alfresco-enterprise-tomcat-2.1.1 folder to simply alfresco.
- I then went back to the web browser and went to 'Company Home'>'Downloads'>'2.1 Releases'>'2.1.1'>'License Files'
- I am not sure if I can do this with our agreement, but I downloaded the 'enterprise-network-customer-unlimited.lic' file.
 |
I did get approval from Joe Van De Graaff at Alfresco to use the license for a test installation to get us through this issue. |
- I logged out of the Alfresco customer web site.
- I Googled on jTDS to find the jTDS JDBC driver and downloaded the jtds-1.2.2-dist.zip file from the website.
- Using Windows Explorer, I could just open the jTDS zip file and copy the jtds-1.2.2.jar file.
- I then pasted it in the directory c:\bin\alfresco\tomcat\common\lib directory.
- I created a c:\data\alf_data directory where the alfresco data will be stored. This is different from the production installation in that the content is stored on a network appliance (\\tornado.shore.mbari.org\alfresco).
- I installed a copy of SQL Server 2005 locally to use for the database to back the Alfresco test install.
 |
In order to do this without warnings, I had to go back and install IIS through the Add/Remove Programs Control Panel. |
- I used the Local System account to run services and only used Windows Authentication logins
- I installed all the service packs and the SQL Server Management Studio product to admin DBs.
- In SQL Server, I added the SHORE\DB_Collaboration accounts to the logins.
- I created a new database named alfresco-test and made SHORE\DB_Collaboration the owner.
- I then went to the c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions directory for the customization of the server.
- I edited the custom-repository.properties file
- Changed the dir.root and dir.indexes to look like:
- Commented out the db.* lines for the HSQL Connection (db.driver and db.url)
- Uncommented the db.* lines for MSSQL and changed to use the jTDS driver. They should look like (except the password should be the right one):
- I also added the following section to override the mail server settings
- Edited the custom-hibernate-dialect.properties file
- Commented out the HSQL Dialect
- Uncommented the MSSQL Dialect
- Now this is not necessarily fun, but in order to really get it configured the way we want it, you need to pull the original .war file out, edit some stuff inside and re-create the .war.
 |
This should all be done before starting Alfresco for the first time. |
- Copy the c:\bin\alfresco\tomcat\webapps\alfresco.war file to your home directory.
- Make a second copy so that you will always the original (I copied to alfresco.war.orig and moved it somewhere else. It is important to move it and have only the alfresco.war file in the directory because when you un-jar it, all the files go right where alfresco.war is.)
- From a command line, un-jar the war file using:
- This unpacks a lot of files and after it completes, move (or delete) the alfresco.war file from the directory. This needs to be done so it does not end up in the new .war file.
- I wanted to change the "Company Home" that seems to be everywhere to something that says MBARI.
- Edited ./WEB-INF/classes/alfresco/messages/webclient.properties and changed company_home from 'Company Home' to 'MBARI Test'
- Edited ./WEB-INF/classes/alfresco/messages/webclient_en_US.properties and changed company_home from 'Company Home' to 'MBARI Test'
- I edited ./WEB-INF/classes/alfresco/messages/bootstrap-spaces.properties and changed the first two lines to read
- Edited ./WEB-INF/classes/alfresco/messages/bootstrap-spaces_en_US.properties and made the same changes as the previous step
 |
This took a bit to find all these, and to be honest, I am not sure which one actually made the change on the GUI, but I suspect it was the _en_US ones. |
- When users are imported via LDAP, user spaces get created automatically. In order to put them where I wanted them to go (instead of right in the Company Home), I edited the ./WEB-INF/classes/alfresco/authentication-services-context.xml file. In the file there is a bean with an name of personalHomeFolderProvider. There is a property name 'path' and I added
to the end to try to get them to create the user spaces there instead of in the Company Home. The final bean XML looks like:
- I wanted to change the logo that is used. I attached the replacement Alfresco Logo. Copy this to ./images/logo and overwrite the one that is there.
 |
Note that I did NOT setup SSL for this installation so if I will need to come back and do that if I want truly parallel systems |
- Now in order to change the default behavior so that all content is versioned from the start, I edited the .\WEB-INF\classes\alfresco\model\contentModel.xml and searched for the content type definition block.
and added the following block right before the ending </type> tag:
so the final block looks like:
- That takes care of all the changes to the WAR file. We can now put it back into .war form.
- While you are in the directory you expanded the war file in, run
- jar cvfm alfresco.war META-INF\MANIFEST.MF .
- You should now have an alfresco.war file in the directory. Move that back to the alfresco install and overwrite the existing one.
- Most users like the details view, so I set the default to that by editing c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions\web-client-config-custom.xml and added:
right before the closing </alfresco-config> tag.
- Now in order to use MBARI accounts, NTLM authentication was turned on and then chained with the native Alfresco accounts so that we could have non-MBARI accounts on the Alfresco server.
- For simplicity sake, I have attached the files and you can simply download and install them in the c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions directory.
 |
Before doing these next steps, rename the file-servers-custom.xml file to file-servers-custom.xml.orig so you will have a backup of the original |
- First install the CLT:NTLM Configuration XML File
- Next install the CLT:Authentication Chaining Configuration File
- Next install the CLT:CIFS configuration file and over-write the existing one.
- Now in order to setup a job that imports users and groups once a day, download and install the CLT:LDAP configuration file.
- The ldap sych XML file simply contains all the configuration information with properties to hold the actual values for your installation. To define these properties, I installed the following CLT:properties file. If you are setting up your own installation, you will change these properties for your install.
 |
In the CIFS configuration file, make sure you change the <host name=""> tag to reflect a unique name on the network. |
- Next install the CLT:customized authority configuration file (this gives administrative privs to certain accounts).
 |
Note that I did NOT change the server to take over port 80 traffic as the SQL Server install seemed to want IIS which is currently using port 80 |
- Now in order for the alfresco web application to be the default, I edit the c:\bin\alfresco\tomcat\conf\server.xml file and added:
as the last line of the <Host> tag section (right before the closing </Host> tag).
 |
You will also notice the Valve tag that I had to add to turn off proxy cache disabling so that IE clients would work correctly over SSL. Gotta love M$. |
- Just to keep things clean, I edited the c:\bin\alfresco\alfresco.bat file and put 'rem' in front of the second JAVA_OPTS set as I am using Java 6.
- You are now actually ready to start alfresco for the first time! Open a command window and cd over the to c:\bin\alfresco directory and then type:
- After a long time (took several minutes on a regular PC), look at the alfresco.log file in the c:\bin\alfresco directory and see if it looks like everything started OK, you can also check the database to see if the tables have been created in the alfresco-test database. You should also be able to go to http://alfresco-test.shore.mbari.org:8080 and see the alfresco web application.
- Now from the command window where you ran alf_start.bat, run alf_stop.bat to shut the server down. Check the alfresco.log file to see if anything weird happened. If not, try restarting it with alf_start.bat again and look at the alfresco.log file. Sometimes, you can't restart it because you get:
Sigh, so in order to keep Alfresco from hurting itself, you might have to turn off the schema updates. This is done by editing the c:\bin\alfresco\tomcat\shared\classes\alfresco\extensions\custom-repository.properties and adding the following:
and then restarting alfresco.
- To install Alfresco as a Windows Service use a command prompt and enter the following:
- To uninstall the service, at a later time, do the following:
- To edit your service settings at any time:
 |
These next couple of steps had to be taken to install a patch from Alfresco for an issue with bulk uploads I was having. Essentially when file and path structures get really long and nasty, Alfresco was throwing an error and bailing out. This patch (two Java classes) fixed that issue. |
- Next, I downloaded the attached CLT:JAR file and copied it to the c:\bin\alfresco\tomcat\webapps\alfresco\WEB-INF\classes directory.
- I shutdown Alfresco and then unjarred the file to install the new classes. They are:
- org/alfresco/filesys/smb/server/SMBSrvPacket.class
- org/alfresco/filesys/util/DataBuffer.class
- I would assume since they do not overwrite anything, that this location is further up in the class loader and so it will load these new classes first.
- I deleted the act2139.jar file and the META-INF directory that the unjarring process created.
- I did not do this, but you can verify this took, I run alfresco with the
and verifyied that you can find some line, some where, that shows:
and NOT:
|